<template>
  <article class="page">
    <headerbar>
      现场会导览
    </headerbar>
<!--    <section class="onlineObservation">-->
<!--      <div class="vegetables"  @click="showMore('骆家桥村蔬菜种植基地')"></div>-->
<!--      <div class="tigerhill" @click="showMore('大冲村虎山彝寨')"></div>-->
<!--      <div class="orchard" @click="showMore('江田水果种植基地')"></div>-->
<!--      <div class="teaexpo" @click="showMore('芦荻哨村茶博园')"></div>-->
<!--    </section> -->
        <section class="onlineObservation">
          <div class="vegetables"  @click="go('骆家桥村党支部','999007001011')"></div>
          <div class="tigerhill" @click="go('芦荻哨村党支部','999007001038003')"></div>
          <div class="orchard" @click="go('芦荻哨村党支部','999007001038003')"></div>
          <div class="teaexpo" @click="go('大冲村党支部','999007001009')"></div>
        </section>
    <onlineDialog class="ob-dialog" :title="title" ref="onlineDialog">
      <section class="main-dialog">
        <div class="radio">
          <div class="play"></div>
        </div>
        <section class="introduce">
               贵阳市推进2.5万亩高标准蔬菜保供基地建设，以贵阳大市场带动全省大扶贫的重要举措，推动农业高质量发展，打好脱贫攻坚战，解决贵阳市蔬菜保供季节性缺口和供应结构性不平衡问题。近日，骆家桥村高标准蔬菜保供基地迎来丰收，每天有30吨西红柿运往全国各地，现保供稳价和脱贫攻坚的双赢。
        </section>
      </section>
      <div class="footer-dialog">
        <div class="good-btn" @click="getGood" :class="{'active':showGood}">点赞({{num}})<img v-if="!showGood" class="good-icon" :src="goodSrc" alt=""><img v-else :src="getGoodSrc" alt=""></div>
        <div class="signin-btn" @click="getSign" v-if="!showSign">立即签到<img class="sign-icon" :src="signinSrc" alt=""></div>
        <div class="signin-btn" @click="getSign" v-else :class="{'active':showSign}">已签到<img class="sign-icon" :src="signinSrc" alt=""></div>
      </div>
    </onlineDialog>
  </article>
</template>

<script>
  import dialogMore from '../../../components/layout/dialogMore.vue'
  import onlineDialog from '../../../components/layout/onlineDialog.vue'
  import tools from '@/utils/tools'
  import cancel from '../../../../static/images/dangjian/home/cancel.png'
  import good from '../../../../static/images/dangjian/home/good.png'
  import getGood from '../../../../static/images/dangjian/home/getGood.png'
  import play from '../../../../static/images/dangjian/home/play.png'
  import signin from '../../../../static/images/dangjian/home/signin.png'

  let isSubmiting = false // 正在提交
  export default {
    components: { dialogMore, onlineDialog },
    name: 'onlineObservation',
    data () {
      return {
        title: '骆家桥村蔬菜种植基地',
        cancelSrc: cancel,
        goodSrc: good,
        getGoodSrc: getGood,
        playSrc: play,
        signinSrc: signin,
        num: '2000',
        signText: '立即签到',
        showGood: false,
        showSign: false,
        groupName: '',
        dgwName: '',
        isRecommendNow: 0,
        tabIndex: 0,
        currentTabIndex: 0,
        userId: ''
      }
    },
    created () {
      this.userId = this.tools.getUserInfo().id
      // this.partyGroupId = this.$route.query.partyGroupId
      this.isRecommendNow = 1
      this.groupName = this.$route.query.groupName
      this.dgwName = this.$route.query.dgwName

      this.$nextTick(()=>{
        var onlineObservationFirst = JSON.parse(sessionStorage.getItem("onlineObservationFirst"));
        if (onlineObservationFirst) {
          this.findHints();
        }
      })
    },
    mounted() {
    },
    methods: {
      // showMore (data) {
      //   this.title = data;
      //   this.$refs.dialog.show()
      // },
      getGood() {
        this.showGood = !this.showGood;
      },
      getSign() {
        this.showSign = !this.showSign;
      },
      go (title,partyGroupId) {
        this.partyGroupId = partyGroupId
        this.$router.push({name: 'demoHonor', query: {partyGroupId: this.partyGroupId, groupName: this.groupName, dgwName: this.dgwName, isRecommendNow: this.isRecommendNow,title: title}})
      },
      findHints () {
        this.$refs.onlineDialog.show()
        // console.log(this.$store.state.oneAnswerHints);
        // if (this.$store.state.oneAnswerHints) {
        //   this.$refs.onlineDialog.show()
        //   this.$store.state.oneAnswerHints = false
        // }
      }

    }
  }
</script>

<style scoped>

</style>
